package com.xy.biz.base.controller;

import com.xy.biz.base.service.ApplicationService;
import com.xy.lang.domain.KeyValue;
import com.xy.lang.domain.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/api/base/application")
public class ApplicationController {

    @Autowired
    private ApplicationService applicationService;

    @PostMapping(value = "/list_item")
    public Result<List<KeyValue<Integer, String>>> listApplicationItem() {
        return Result.success(applicationService.listApplicationItem());
    }

}
